<!DOCTYPE html>
<html>

<head>
<meta charset="UTF-8">
<title>Floor View</title>
<script src="/js/websocket.js"></script>
<script src="/js/jquery.min.js"></script>
<script src="/js/sockjs.min.js"></script>
<script src="/js/stomp.min.js"></script>
<script id="code">
    var DEBUG_FLAG = true;
    $(function()
    {
        //启动websocket
        connect();
    });

    function send() {
      var msg = $("#msg").val();
      stompClient.send("/send", {}, msg);
    }

    function sendToAll() {
        var msg = $("#msg").val();
        stompClient.send("/sendToAll", {}, msg);
    }

    function sendToAllByTemplate() {
        var msg = $("#msg").val();
        stompClient.send("/sendToAllByTemplate", {}, msg);
    }
</script>
</head>

<body style="margin: 0px;padding: 0px;overflow: hidden; ">
  <!-- 显示消息-->
  <textarea id="debuggerInfo" style="width:100%;height:200px;"></textarea>
  <!-- 发送消息-->
  <div>消息：<input type="text" id="msg"></input></div>
  <div><input type="button" value="发送消息" onclick="send()"></input></div>
  <div><input type="button" value="发送消息SendToAll" onclick="sendToAll()"></input></div>
  <div><input type="button" value="发送消息SendToAllByTemplate" onclick="sendToAllByTemplate()"></input></div>
</body>
</html>